package cn.gson.crm.model.mapper;

import cn.gson.crm.model.pojos.*;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

@Repository
public interface ContractMapper {
    //查询当前登录人的所有合同
    public List<Contract> selectContrat(@Param("oursingner") Integer oursingner);
    //按条件查询合同同
    public List<Contract> selectWhereContrat(@Param("oursingner") Integer oursingner,String condition);
    //高级查询（多条件查询）
    public List<Contract> gaojiselect(@Param("oursingner") Integer oursingner,@Param("condition1")  Integer condition1,@Param("condition2")  String condition2,@Param("condition3")  String condition3,@Param("condition4")  String condition4,@Param("condition5")  String condition5,@Param("condition6") String condition6);
    //新增对应客户下拉框
    public List<Customer> selectcustomer(@Param("yg") Integer yg);
    //新增客户签约人下拉框
    public List<Linkman> selectqyr(@Param("cid") Integer cid);
    //新增审批人下拉框
    public List<Employee> selectsp(@Param("dept") String dept);
    public List<Employee> selectLB();
    //根据客户查询报价
    public List<Customer> selectbaojia(@Param("cid") Integer cid);
    //根据客户查询所有没有签合同的销售机会
    public List<Sales> selectslase(@Param("sid") Integer sid);
    //新增之后此销售机会合同进行绑定-->
    public void updatexs(@Param("cid") Integer cid,@Param("sid") Integer sid);
    //根据合同状态查询合同记录
    public List<Contract> selectzhutai(@Param("oursingner")Integer oursingner,@Param("zhuntai") String zhuntai);
    //  <!--修改查询报价和审批人-->
    public List<Customer> selectxiubao(@Param("sid") Integer sid);
    public List<Employee> selectxiusp(@Param("cid") Integer cid);
    //根据年份查询
    public List<Contract> selectnian(@Param("oursingner") Integer oursingner,@Param("nian") String nian);
    //统计合同数量
    public List<Shuliang> selectcontract();
}
